import fetch from '@/api'

export function getStockManageList(params) {
    return fetch({
        method: 'get',
        url: `/inventory/manager/page`,
        params,
    })
}

// 新增
export function addStockManage(data) {
    return fetch({
        method: 'post',
        url: `/jobPoint`,
        data
    })
}

// 编辑
export function updateStockManage(id,data) {
    return fetch({
        method: 'put',
        url: `/jobPoint/${id}`,
        data
    })
}

// 删除
export function deleteStockManage(id) {
    return fetch({
        method:'delete',
        url:`/jobPoint/${id}`
    })
}

//货物冻结
export function frozenStock(id,data) {
    return fetch({
        method: 'post',
        url: `/inventory/frozen/${id}`,
        data
    })
}

//取消冻结
export function unfrozenStock(id,data) {
    return fetch({
        method: 'post',
        url: `/inventory/cancel/frozen/${id}`,
        data
    })
}

//库存调整
export function adjustStock(id,data) {
    return fetch({
        method: 'post',
        url: `/inventory/adjust/inventory/${id}`,
        data
    })
}

